class BalanceSweeper < ActionController::Caching::Sweeper

  observe Declaration, Deposit

  def after_create(data)
    clean_balance_cache
  end

  def after_save(data)
    clean_balance_cache
  end

  def after_destroy(data)
  end
  
  def clean_balance_cache
    #Expire the cache for the module right
    #expire_fragment(:controller => 'application', :action => 'balans')
    expire_action :controller => 'ajax', :action => 'module_balans'
  end

end